package org.ysh.core.attachment;

import org.ysh.annotation.AdditionInfoResolver;

import java.io.File;
import java.io.InputStream;

@AdditionInfoResolver(extensions = {"txt","md","html","htm","java","php","sh","go","c","cpp","h","hpp"})
public class UnsupportedAdditionInfoResolver implements AttachmentAdditionInfoResolver {

    private static final UnsupportedAdditionInfoResolver INSTANCE = new UnsupportedAdditionInfoResolver();

    public static UnsupportedAdditionInfoResolver getInstance(){
        return INSTANCE;
    }

    @Override
    public void addAdditionInfo(File tmpFile, AdditionInfo additionInfo) throws Exception {
        throw new UnsupportedOperationException("不支持在此文件格式中追加信息!");
    }

    @Override
    public AdditionInfo readAdditionInfo(InputStream in) throws Exception {
        throw new UnsupportedOperationException("不支持在此文件格式中读取信息!");
    }
}
